Repository navigation
Conversation
…a big one The age chart is drawn at the width it is given, so its labels are the page's size, and only as tall as the ages it shows need. Under ten open pull requests it is a short list with each one's age instead of a plot. An external benchmark is one thin dashed line, only while the org has no percentile lines of its own. A mark's card shows on hover or focus and goes away after; the key names only the marks drawn; selecting the ones past p85 is a button. With no history, the strip and the conditions stop repeating "not enough history yet", failures and review health are one line instead of two empty panels, and the phone shows the open pull requests by age. Screenshot checks cover all three sizes at 1440, 1280, 1024 and 375, with no tooltip at rest and the chart never taller than its marks need.
…d semantic colors The root font size was 18px, so every Tailwind size rendered on a fraction (13.5, 15.75, 20.25, 27px) and spacing on a 4.5px grid; pages added their own arbitrary sizes and raw palette colors on top. The root is back to the browser's 16px and src/app/tokens.css defines the system: - a seven-step ramp (13, 15, 16, 18, 20, 24, 32px), each with a fixed line height on the 4px grid, three weights, and semantic text styles (text-page-title, text-section-title, text-body, text-caption, text-data, text-numeric, text-display); - radii (4, 6, 8, 12px), two elevations for floating surfaces; - semantic colors for surfaces, lines, text and status (good, warn, bad, info, severe, done, accent) as --ch-* variables named in @theme, ready for a light theme; src/lib/tokens.ts mirrors them for charts and QR codes. The UI lint fails an arbitrary font size, an off-ramp weight, an arbitrary or off-scale padding, margin or gap, a raw hex color outside the token files, and a tokens.ts value that drifts from tokens.css; palette classes are counted against a baseline that only goes down. A rare real case is allowed with a ui-lint-allow comment that says why. The shell and every shared component move onto the tokens; buttons and fields share one height and radius; PageHeader draws the one title style and the first block under it sits 24px below on every page. Pages under src/app move in their own change (TOKENS_LATER in the lint). DESIGN.md is the guide, and e2e/design-tokens.spec.ts checks what renders on the shell and three pages at 1440 and 375 wide.
…e page column Section and settings tabs keep the 44px touch height below md: now that the root is 16px. The combobox trigger matches the 36px field height. The settings column takes the one page width, so its left edge lines up with every other page. The lint and the class rewrite read data-attribute variants and the trailing important mark. Specs that matched palette class names match the semantic ones; the phone menu test closes the full-screen sheet with its Close button.
…kens Inline code draws at the caption size instead of 0.9em of its line, so it never lands between ramp steps; bold text in prose is semibold. The token rules cover src/app/foryou/ from the start, and DESIGN.md spells out row titles, group headers, rail numbers and button sizes in lists.
…able repo table - Open PRs by stage (12 weeks) and every merged PR's cycle time (90 days) now show on the org overview as well as a repo's, from history: dated axes, small percentile labels in a gutter, a card per day or point on hover or focus, and a "stage split from" mark where the change log begins. - A panel with nothing to say is one quiet line: zeros and numbers that aren't there yet are named once instead of rows of 0 and "not enough history yet" (Stale, Failures, Review, Security, CoderHelm). - The age chart spans the page and the panels flow in two balanced columns, so no gap opens under a short one. - The repo table: headers with units, columns with nothing in any row left out, stale and abandoned apart, and the health rule behind "How health is decided". - "Too few to rate yet" for a recorded number with too few events. - Fixtures are irregular, with quiet weekends.
src/app/prs (Overview and List) is held to the dashboard's tokens and ui-lint: semantic colors only (410 palette classes replaced), sentence case SectionHeadings instead of uppercase overlines, numbers on the type ramp, and the charts' text at CHART.fontSize with axis labels spaced so a phone never overlaps them.
Superseded by CoderHelm's latest review
…lumns that end together
The Open now tiles mute a stage with none; Whose turn and the conditions
leave out their zeros ("nothing stale, abandoned or zombie"). On a new
install the history note says once what fills in as pull requests merge,
instead of a separate failures and review card. The panels go to two
columns by measured height, tallest first, so both columns end together.
Superseded by CoderHelm's latest review
Superseded by CoderHelm's latest review
…visible bypass slice - The legend check counts only drawn marks (a dot or a band), never the chart's own element, and a test takes the people's marks off the chart and proves the check then fails. - "Too few to rate yet" has a test: a recorded number with too few events says that, not that history is missing. - A new install is checked on a phone (its open PRs by age, no failures or review folds) and on a desktop (no failures or review panel), and an org with merges shows both. - The balanced columns observe the live panels after every placement, so a panel growing re-balances them; a placement re-renders only when it changes. - The bypass slice of the coverage bar uses the solid tone again. - The leftover repo_view type and its comment are gone.
The new scope trail and repo picker from main are kept, and their palette classes move onto the semantic tokens so src/app/prs stays at zero.
There was a problem hiding this comment.
❌ Changes requested: 2 required items (required rules, failing checks or unproven critical paths).
Holding the merge:
dashboard/e2e/prs-overview-sizes.spec.ts:60Legend check can never fail (required: tests with behavior changes (this repository's "Require tests" setting))dashboard/src/app/prs/overview/model.ts:140New "Too few to rate yet" wording has no test (required: tests with behavior changes (this repository's "Require tests" setting))
Why changes requested: dashboard/e2e/prs-overview-sizes.spec.ts:60 Legend check can never fail (required: tests with behavior changes (this repository's "Require tests" setting)); dashboard/src/app/prs/overview/model.ts:140 New "Too few to rate yet" wording has no test (required: tests with behavior changes (this repository's "Require tests" setting)).
Additional findings
- 💬
dashboard/src/app/prs/overview/page.tsx:1109— Phone age list and no-history layout are not asserted (question, not blocking)
Details: PR Overview · 🎯 Risk · 🧪 Verification · Earlier comments
PR Overview
Redesigns the Pull requests overview for new, medium and large orgs, with a new age chart and trend charts, quiet panels, a readable repo table and a move of src/app/prs onto the design tokens.
Changes
- Age chart is drawn at its real width, is short, shows a hover or focus tooltip only, and becomes a list under ten open PRs
- New trend charts (open PRs by stage, cycle time of merged PRs) read from history
- Quiet panels and a one-line note for a new install; columns are balanced
- Repo table gets units in its headers, drops empty columns and puts the health rule behind a disclosure
- src/app/prs is held to ui-lint and all palette classes are replaced by semantic tokens
- New sizes e2e spec and fixtures cover three org sizes at four widths
- The age chart is drawn at its container width and sized to its ages. It becomes a ranked list under 10 open PRs. A thin dashed external benchmark shows only when the org has no percentile lines of…
- Tooltips appear on hover or focus only, and the native title tooltips on marks are gone. The legend lists only the marks drawn.
Reviewed Changes
15 changed files.
| File | Description |
|---|---|
dashboard/e2e/prs-overview-data.ts |
Fixture: drops the old repo_view flow and adds seeded trends (weekday merges, long-tailed cycle times, young-org split date). |
dashboard/e2e/prs-overview-sizes.spec.ts |
New spec: sparse, medium and big orgs at four widths, with layout, tooltip, legend, quiet-panel, phone-list and no-sideways-scroll checks. |
dashboard/e2e/prs-overview-sizes.ts |
New fixtures for the three org sizes, built from invented bookstore data. |
dashboard/e2e/prs-overview.spec.ts |
Updates for the new tokens and rule disclosure. Adds the external benchmark line, tooltip on focus, trends, young split and 'too few to… |
dashboard/scripts/ui-lint.mjs |
Removes src/app/prs from the token-rule exemption list, so it is now linted. |
dashboard/src/app/prs/detail.tsx |
Palette classes become semantic tokens; SectionTitle uses SectionHeading. |
dashboard/src/app/prs/overview/charts.tsx |
Reworks AgingChart; adds AgingList, Legend, Tip, StageTrend, CycleTrend and CycleKey; moves all chart classes to tokens. |
dashboard/src/app/prs/overview/model.ts |
Stage fills move to semantic token classes. gapWords adds a "Too few to rate yet" wording for reason few. |
dashboard/src/app/prs/overview/page.tsx |
Moves the page onto tokens, adds Trends and Balanced, and adds the quiet-panel and no-history layout. It also adds the phone age list… |
dashboard/src/app/prs/overview/panels.tsx |
Rebuilds the Stale, Failures, Review and Security panels on fold()/Rest so empty rows collapse into one muted line, and moves every… |
dashboard/src/app/prs/overview/parts.tsx |
Token classes, SectionHeading in Card, and the new joinWords, fold and Rest helpers for quiet panels. |
dashboard/src/app/prs/overview/settings/page.tsx |
Palette classes replaced with the fg-muted token. |
dashboard/src/app/prs/page.tsx |
Palette classes replaced with semantic tokens in the list page. |
dashboard/src/app/prs/scope.tsx |
Palette classes replaced with semantic tokens. |
dashboard/src/lib/api.ts |
Adds the few reason doc and replaces repo_view with the trends shape. |
I re-read the earlier findings against this head. The files in this part (the ui-lint exemption and the token migration in detail.tsx) look fine. The token migration only changes classes. The alpha-modified token classes (for example bg-raised/40) are already used elsewhere in the repo.
🎯 Risk: HIGH (69/100)
██████████blast radius 100 — ~271 dependent refs; hottest: detail.tsx (~25), model.ts (~25), page.tsx (~25)███░░░░░░░sensitive area 30 — sensitive-adjacent additions████░░░░░░test coverage 40 — 13 source / 2 test file(s) changed██████████size/spread 91 — 2867 lines across 15 file(s), spread 68%
FYI: apart from what blocks by rule, nothing here holds the merge. Assumed: The three test-coverage findings (E1/E7 required-tests, E8 security correctness) are real gaps and defects CoderHelm should fix in one more cycle rather than block the human on, so it will fix the legend selector (count aging-dot/aging-band below the root), add fixtures/assertions for 'Too few to rate yet' (reason:'few') and the phone/no-history layout at 375px, fix the alerts-text fold to keep explanatory text for non-'on' dependabot states, and re-attach the ResizeObserver after cols change.
🧪 Verification
✅ Ran cd 'dashboard' && npm ci --no-audit --no-fund --workspaces=false in the sandbox: passed.
✅ Ran cd 'dashboard' && npm run typecheck in the sandbox: passed.
Not run here:
dashboard/e2e/prs-overview-sizes.spec.ts: packagedashboardhas no unit-test script whose runner takes one file, so the pull request's CI result stands for itdashboard/e2e/prs-overview.spec.ts: packagedashboardhas no unit-test script whose runner takes one file, so the pull request's CI result stands for it
Earlier comments
16 settled and resolved · 1 still open
Was this review right? Rate it 👍 / 👎 so the reviewer learns · reply @coderhelm re-review or @coderhelm <question>
| await expect(aging.getByTestId("aging-row")).toHaveCount(marks); | ||
| } else { | ||
| const chart = aging.getByTestId("aging-chart"); | ||
| const box = await chart.boundingBox(); |
There was a problem hiding this comment.
🛑 Blocking (required: tests): Legend check can never fail (tests)
charts.tsx:318 puts data-marks on the chart's root svg, built from the same present set the legend uses. aging.locator('[data-marks~="mark"]') always matches that root element, so every legend item passes even when no mark of that kind is drawn. 'Every legend item is drawn' is not actually tested. Count only elements below the root, for example aging-dot and aging-band, or the dot elements at charts.tsx:401 and 482.
This repository requires tests with behavior changes, so this blocks the merge until the test is in the PR.
| /** "Not enough history yet" or "Not recorded yet": the short words for a gap. */ | ||
| export function gapWords(m: OverviewMissing | undefined): string { | ||
| return m?.reason === "not_recorded" ? "Not recorded yet" : "Not enough history yet"; | ||
| return m?.reason === "not_recorded" ? "Not recorded yet" : m?.reason === "few" ? "Too few to rate yet" : "Not enough history yet"; |
There was a problem hiding this comment.
🛑 Blocking (required: tests): New "Too few to rate yet" wording has no test (tests)
m?.reason === "few" ? "Too few to rate yet" is a new user-visible branch of gapWords. A search of dashboard/e2e finds no fixture with reason: "few" and no assertion on that text. prs-overview-data.ts only emits history reasons (lines 440-444). The repo requires behaviour changes to be covered by tests.
This repository requires tests with behavior changes, so this blocks the merge until the test is in the PR.
| // Only a different placement re-renders, so measuring never loops. | ||
| if (`${next[0].join(",")}|${next[1].join(",")}` !== placed) setCols(next); | ||
| }; | ||
| place(); |
There was a problem hiding this comment.
💬 FYI: Balanced columns stop re-measuring after the first placement (bug, not verified)
The ResizeObserver is attached on the first, flat render (lines 1015-1016). place() then calls setCols, which renders each box inside a new column wrapper (lines 1029-1030). The boxes remount because they have a new parent. The observer is left watching detached elements and the live boxes are never observed. The effect depends only on [keys]. After the first placement, a content change that alters a panel's height, or a resize across the lg breakpoint, never re-balances. The columns can then end at different heights again. Fix: re-attach the observer after cols changes (add cols to the effect and observe the current refs), or keep one stable wrapper per panel and move it with CSS order.
FYI, not a block: on the whole picture this is not a named correctness, security or data-loss problem to hold the merge on.
| { key: "human", label: "Human-approved", fill: "bg-good-solid" }, | ||
| { key: "ai_only", label: "AI-reviewed only", fill: "bg-info-solid" }, | ||
| { key: "non_owner", label: "Non-owner approval", fill: "bg-warn-solid" }, | ||
| { key: "bypass", label: "Bypass or exemption", fill: "bg-severe-solid" }, |
There was a problem hiding this comment.
💬 FYI: Bypass coverage segment uses a 10% tint, so it is nearly invisible (bug, not verified)
fill: "bg-severe-soft" replaces bg-orange-500. --ch-severe-soft is a 10% tint made for chip backgrounds. The other entries use *-solid tokens. The Bypass slice of the coverage bar and its swatch will almost vanish, and that is the state the panel exists to flag. Use bg-severe-solid, which list/status.tsx:34 already uses for the same tone.
FYI, not a block: on the whole picture this is not a named correctness, security or data-loss problem to hold the merge on.
| { key: "bypass", label: "Bypass or exemption", fill: "bg-severe-solid" }, | |
| { key: "bypass", label: "Bypass or exemption", fill: "bg-severe-solid" }, |
| const [hover, setHover] = useState<number | null>(null); | ||
| const pad = { l: 32, r: 10, t: 8, b: 22 }; | ||
| const H = 180; | ||
| const plotH = H - pad.t - pad.b; |
There was a problem hiding this comment.
💬 Suggestion: StageTrend treats a split date after the last day as split from day 0 (correctness)
days.findIndex(...) returns -1 when splitFrom is later than every day, and Math.max(0, -1) turns that into 0. Stacked stage layers are then drawn for days that have no stage split. This is a rare edge, but split = days.length in that case would draw the total only.
| flow: { day: string; stages: Partial<Record<PrStage, number>> }[] | null; | ||
| merged: { key: string; number: number; title: string; cycle_secs: number; merged_at: string; coderhelm: boolean }[] | null; | ||
| /** From history alone: open PRs per stage per day (12 weeks) and every merged PR's cycle time (90 days). */ | ||
| trends?: { |
There was a problem hiding this comment.
💬 FYI: Confirm the platform answer sends trends (question)
StageTrend and CycleTrend read trends (flow, split_from, merged) from the platform answer. A search of the platform repo for split_from found nothing relevant. The dashboard hides the charts when trends is absent, so nothing breaks if the platform ships later. Please confirm the platform change ships before or with this one.
| <Num>{s.sensitive_without_owner}</Num> | ||
| </div> | ||
| ), | ||
| k.zero(total(s.alerts?.open_without_pr), "security alerts without a PR") && ( |
There was a problem hiding this comment.
💬 FYI: Alerts text is hidden whenever the counts are zero (correctness, not verified)
alerts.text used to show whenever s.alerts was present. It now renders only inside k.zero(total(open_without_pr), ...), so it is dropped when all four severity counts are 0. The type says alerts.dependabot can also be off, no_permission, not_accepted or unknown (api.ts:2699), and in those cases the counts are probably 0 because alerts can't be read, not because there are none. The panel then reads "No security alerts without a PR", which would be wrong, and the text that explains the real state is hidden. I couldn't check what the platform puts in text for those states. If it explains them, keep it visible, or only fold the row when s.alerts.dependabot === "on". The fixtures only cover dependabot: "on".
This blocks: Shows a correctness defect: non-'on' states yield zero counts and hide explanatory text, producing a wrong 'No security alerts' message, and fixtures don't exercise it
FYI, not a block: on the whole picture this is not a named correctness, security or data-loss problem to hold the merge on.
Superseded by CoderHelm's latest review
Summary
The Pull requests overview looked broken with real, sparse data: a huge, nearly empty age chart, thick external benchmark bars, oversized axis labels, a nine-item legend crammed into one line, and a native tooltip left over the text. This is a design pass on the whole overview for three sizes of org: a new install (1 repo, 3 open PRs, no history), a medium org (14 repos, about 40 open) and a big one (about 300 open).
Changes
Age chart (
charts.tsx):Benchmarks: an external benchmark is one thin dashed line with a small label, shown only while the org has no percentile lines of its own.
Tooltip: a mark's card shows on hover or focus only. It sits inside the plot, above the mark (or below it near the top), and goes away when the pointer leaves. The native
<title>tooltips on marks are gone.Key: it names only the marks drawn and wraps under the title. "Select N past p85" is now a small button that appears only when there are such PRs.
No history (
page.tsx):Tests:
prs-overview-sizes.spec.tscaptures all three sizes at 1440, 1280, 1024 and 375. At each one it checks:prs-overview.spec.tsadds the external benchmark line and tooltip on focus.Trends (both the org and a repo overview):
trendsin the platform answer) and hidden while there's nothing to draw.Quiet panels: Stale, Failures, Review, Security and CoderHelm show only rows with something in them. Zeros and numbers that aren't there yet are named once, in one muted line, so a new install's panels are a sentence each.
Layout: the age chart spans the page, and the panels flow in two balanced columns.
Repo table:
Design tokens (Dashboard design tokens: one type ramp, a 4px spacing scale, radii and semantic colors #551):
src/app/prs(Overview and List) is held to ui-lint. All 410 palette classes became semantic tokens, uppercase overlines became sentence-caseSectionHeadings, numbers moved onto the type ramp, and chart text usesCHART.fontSize.Fixtures are irregular, with quiet weekends.
Verification
npm run lint(UI lint, no hosted links, fixture words) andnpm run typecheckare clean.npm run lintpasses withsrc/app/prsno longer exempt from the token rules, andnpm run typecheckis clean.prs-overview.spec.ts,prs-overview-sizes.spec.ts,prs.spec.tsand the PR routes ofno-sideways-scroll,no-mid-word-breaksandreadable-textpass: 68 tests.text_guard.pypasses.